package com.example.library;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 图书馆管理系统启动类
 */
@SpringBootApplication
@MapperScan(basePackages = "com.example.library.mapper")
@EnableTransactionManagement
public class LibraryManagementApplication {

    public static void main(String[] args) {
        SpringApplication.run(LibraryManagementApplication.class, args);
        System.out.println("\\n" +
                "  _      _ _                          __  __                                                   _   \n" +
                " | |    (_) |                        |  \\/  |                                                 | |  \n" +
                " | |     _| |__  _ __ __ _ _ __ _   _  | \\  / | __ _ _ __   __ _  __ _  ___ _ __ ___   ___ _ __ | |_ \n" +
                " | |    | | '_ \\| '__/ _` | '__| | | | | |\\/| |/ _` | '_ \\/ _` |/ _` |/ _ \\ '_ ` _ \\ / _ \\ '_ \\| __|\n" +
                " | |____| | |_) | | | (_| | |  | |_| | | |  | | (_| | | | | (_| | (_| |  __/ | | | | |  __/ | | | |_ \n" +
                " |______|_|_.__/|_|  \\__,_|_|   \\__, | |_|  |_|\\__,_|_| |_|\\__,_|\\__, |\\___|_| |_| |_|\\___|_| |_|\\__|\n" +
                "                                 __/ |                          __/ |                             \n" +
                "                                |___/                          |___/                              \n");
        System.out.println("\n🎉 图书管理系统启动成功！");
        System.out.println("📚 API文档地址: http://localhost:8080/swagger-ui/index.html");
        System.out.println("🔧 健康检查: http://localhost:8080/actuator/health");
    }

}